"""
Digital watches display time in the h:mm:ss format (from 0:00:00 to 23:59:59), i.e. first goes the number of hours, then goes the two-digit number of minutes, followed by the two-digit number of seconds. If necessary, number of minutes and seconds are filled by zeroes to a two-digit number.

N seconds passed from the beginning of the day. Output what the watches will display.

电子表以h：mm：ss格式显示时间（从0:00:00到23:59:59），即首先显示小时数，然后显示两位数的分钟数，然后是两位 秒的位数。 如有必要，分钟数和秒数用零填充为两位数。

从一天开始经过了N秒。 输出手表将显示的内容。
"""
n = int(input())

s = n % 60 % 60
m = n / 60 % 60
h = n / 3600 % 24

print('%d:%.2d:%.2d' % (h, m, s))
